﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReserveMenu0.aspx.cs" Inherits="WeChat.MenuReservation.ReserveMenu0" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title></title>
      <script src="../Script/rem.js"></script>
    <script src="../Script/jquery.min.js" type="text/javascript"></script>
    <script src="../Script/jquery-1.8.3.min.js?v=1.1"></script>
    <script src="../Scripts/mobiscroll-2.13.2.full.min.js?v=1.2"></script>
    <link href="../Content/mobiscroll-2.13.2.full.min.css" rel="stylesheet" />
    <link rel="stylesheet" type="text/css" href="../css/base.css" />
    <link rel="stylesheet" type="text/css" href="../css/page.css" />
    <link rel="stylesheet" type="text/css" href="../css/all.css" />
    <link rel="stylesheet" type="text/css" href="../css/mui.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/loaders.min.css" />
    <link rel="stylesheet" type="text/css" href="../css/loading.css" />
    <link href="../Script/slick/slick.css" rel="stylesheet" />
  <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css"/>
  <script src="http://code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
      <link rel="stylesheet" type="text/css" href="https://res.wx.qq.com/open/libs/weui/1.1.2/weui.min.css"/>
    <script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>  
   <script src="https://res.wx.qq.com/open/libs/weuijs/1.0.0/weui.min.js"></script>

    <script src="../Script/JquerySession.js"></script>
     <script type="text/javascript">
         $(window).load(function () {
             $(".loading").addClass("loader-chanage")
             $(".loading").fadeOut(300)
         })
         function submit() {    //点击确定按钮，把获取订单号，并把订单信息加入数据库 
            // var openid = $("#openid").text();
             $.ajax({
                 type: "post",
                 url: "../MenuReserveHandler.ashx",
                 data: { funcName: 'getGuid' },
                 success: function (result) {
                  
                     if (deductions == "是") {
                         window.location.href = "../JsSDK/WxPay/SubmitOrder.aspx?price=" + $("#sum").text() + "&OrderID=" + result + "&openid=" + openid + "&seldate_dummy=" + $("#seldate_dummy").text();
                     }
                     var sum = $("#sum").text();
                     $($(".datetime")).each(function () {
                         var languageJson = {};
                         $($(this).parents(".all").find("[name = 'myCount']")).each(function () {
                             m = $(this).parents(".bottom").attr("data-id");       //上架ID       
                             languageJson[m] = $(this).text();
                         });
                         var date = $(this).text();
                         $.ajax({
                             type: "post",
                             url: "../MenuReserveHandler.ashx",
                             data: { json: JSON.stringify(languageJson), OrderId: result, date: date, type: "other", funcName: "AddOrderDetail" },
                         });
                     });
                     var state = "";
                     if (deductions == "是") {
                         state = "1";
                     } else {
                         state = "2";
                     }
                     $.ajax({
                         type: "post",
                         url: "../MenuReserveHandler.ashx",
                         data: { OrderId: result, totalPrice: sum, openid: openid, state: state, funcName: "AddOrderList" },
                         success: function () {
                             if (deductions == "否") {//订餐成功
                                 $("#toast").css("display", "block");
                                 setTimeout(" window.location.href ='ReserveMenu0.aspx?openid="+openid+"'", 2000)
                                // $("#que").attr('href', "ReserveMenu0.aspx?openid=" + openid)
                                 

                             }
                         }
                     });
                 },
                 error: function () {
                     alert("异常！");
                 }
             });
         }
         //加入订单按钮
         function add(name, price, cbid) {
             var height = $(window).height();
             var cc = $("#determine").height();
             $(".am-share-sns").css("height", height - cc);
             var datetime = $("#seldate_dummy").val();//获取选择预定的时间
             $.ajax({
                 type: "post",
                 url: "../MenuReserveHandler.ashx",
                 dataType: "json",
                 async: false,
                 data: { sdmc: name, funcName: 'getTimeState' },
                 success: function (data) {
                     for (var i = 0; i < data.length; i++) {
                         var sdmc = data[i].sdmc;
                         var kssj = data[i].kssj;
                         if (datetime == "")//如果时间为空则弹框提醒
                         {
                             $(".weui-dialog__bd").html("请选择用餐时间");
                             $("#dialog").css("display", "block");
                         } else {
                             var d = new Date();

                             var a = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" +( d.getMinutes() + reservationtime) + ":" + d.getSeconds();
                             var b = datetime + " " + kssj;
                             if (new Date(a) > new Date(b)) {
                                 $(".weui-dialog__bd").html("已不能订购今天的" + sdmc);
                                 $("#dialog").css("display", "block");
                                 return;
                             }
                             else {
                                 var myar = new Array();
                                 $($("[name='" + datetime + "']")).each(function () {
                                     myar.push($(this).text());
                                 });
                                 //debugger
                                 // 包含该日期
                                 if (myar.indexOf(datetime) != -1) {
                                  
                                     var myarr = new Array();
                                     $($("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='ww']")).each(function () {
                                         myarr.push($(this).text());
                                     });
                                     if (myarr.indexOf(name) != -1) { //如果提交菜单弹出项已包含该菜品
                                         $("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='" + name + "']").parents(".bottom").find("[name='myCount']").text(function (n, c) { return Number(c) + 1 });
                                         $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                         $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                     }else{
                                         $("[name='" + datetime + "']").parents(".all").find(".top").after('<div class="bottom clearfloat" data-id="' + cbid + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\')"><img src="../images/jia.jpg" /></li></ul></div>');

                                         $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                         $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                     }
                                 }
                                 else {   //不包含该日期则加入日期  
                                     $(".sdetail").prepend(' <div class="all"><div class="top clearfloat" name="top"><div class="you clearfloat fl"><span class="datetime" name="' + datetime + '">' + datetime + '</span></div></div></div>');
                                     $("[name='" + datetime + "']").parents(".all").find(".top").after('<div class="bottom clearfloat" data-id="' + cbid + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\')"><img src="../images/jia.jpg" /></li></ul></div>');

                                     $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                     $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                 }
                                 //订餐数量大于0才可以提交
                                 if ($('.sdetail').find(".bottom").length > 0) {
                                     $('#determine').attr("onclick", "submit()");
                                 }
                             }
                         }
                     }
                 },
                 error: function () {
                     alert("异常！");
                 }
             });
         }
         //提交菜单加号功能
         function jiaBtn(na, p, datetime) {
             //debugger
             $("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").find("[name='myCount']").text(function (n, c) { return Number(c) + 1 });
             $("[name='count']").text(function (n, c) { return Number(c) + 1 });
             $("[name='sum']").text(function (n, c) { return Number(c) + Number(p) });
         };
         //提交菜单减号功能     
         function jianBtn(na, p, datetime) {
             //  debugger
             var myPrice = $("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").find("[name='myPrice']");
             var myCount = $("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").find("[name='myCount']");
             if (Number(myCount.text()) > 1) {//所减数量大于1
                 myCount.text(function (n, c) { return Number(c) - 1 });
             } else {//所减数量小于1
                 var aa = $("[name='" + datetime + "']").parents(".all").find("[name='" + na + "']").parents(".bottom").length;
                 if (aa == 1) {
                     var bb = $("[name='" + datetime + "']").parents(".all").find("[name='" + na + "']").parents(".all").find(".bottom").length;
                     if (bb == 1) {
                         $("[name='" + datetime + "']").parents(".all").remove();
                     }
                     else {
                         $("[name='" + datetime + "']").parents(".all").find("[name='" + na + "']").parents(".bottom").remove();
                     }
                 }
                 else {
                     $("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='" + na + "']").parents(".bottom").remove();
                 }
                 //}
                 if ($('.all').length < 1) {
                     $('.sdetail').prepend('<div class="top clearfloat"><div class="you clearfloat fl"><p class="tit"></p><span style="text-align:center;margin-top:20px;">没有商品，请选择</span></div></div>');
                     $('#determine').removeAttr("onclick");
                 }
             }
             $("[name='count']").text(function (n, c) { return Number(c) - 1 });
             $("[name='sum']").text(function (n, c) { return Number(c) - Number(myPrice.text()) });
         };
         var Autos = new Array();
         $(document).ready(function () {
             var cbid = "";
             $.ajax({
                 type: "post",
                 url: "../MenuReserveHandler.ashx",
                 async: false,
                 data: { funcName: 'getcbReservation' },
                 success: function (data) {
                     if (data == null) return;
                     data = $.parseJSON(data);
                    
                     $("#empty").remove();
                     if (data == null || data == "") {
                         $("#content").prepend('<div style="text-align:center;padding-top:3rem;" id="empty"><img src="../images/caip.png" style="width:2rem;"/><p style="padding-top:.3rem">商家未提供商品</p></div>');
                     }
                     else {
                         for (var i = 0; i < data.length; i++) {
                     
                             var cbname = data[i].cbname;
                             var cbprice = data[i].cbprice; 
                             cbid = data[i].cbid; 
                          //  $("#content").append('<div class="bottom clearfloat"><div class="lie clearfloat" style="padding:.7rem .2rem;"><div class="right clearfloat fl" style="width:100%;"><a href="#"></a><div class="xia clearfloat"><p class="tit" style="font-size:20px;">' + cbname + ' <span class="jifen fl over" style="float:none;font-size:20px;">￥' + cbprice + '</span><span class="fr db" name="add" id="add" style="margin-right:1rem;"  onclick="add(\'' + cbname + '\',' + cbprice + ',' + cbid+')"><img src="../images/jia.png" /></span></p></div></div></div></div>');
                          //  $("#content").append('<div class="bottom clearfloat"><div class="lie clearfloat" style="padding:.7rem .2rem;"><div class="right clearfloat fl" style="width:100%;"><a href="#"></a><div class="xia clearfloat"><p class="tit" style="font-size:20px;">' + cbname + ' <span class="jifen fl over" style="float:none;font-size:20px;">￥' + cbprice + '</span><span class="fr db" name="add" id="add" style="margin-right:1rem;"  onclick="add(\'' + cbname + '\',' + cbprice + ',' + cbid + ')"><div class="weui-cells weui-cells_checkbox"><label class="weui-cell weui-check__label" for="s11"><div class="weui-cell__hd"><input type="checkbox" class="weui-check" name="checkbox1" id="s11"><i class="weui-icon-checked"></i></div></label></div></span></p></div></div></div></div>');
                             $("#content").append('<div class="bottom clearfloat" style="margin:0"><div class="weui-cells weui-cells_checkbox" style="margin:0"><label class="weui-cell weui-check__label" for="s' + i + '" style="padding-bottom:0.4rem;padding-top:0.4rem;line-height:1.2rem;" name="' + cbid + '"><div class="weui-cell__bd"><p class="tit" style="font-size:20px;">' + cbname + ' <span class="jifen fl over" style="float:none;font-size:20px;">￥' + cbprice + '</span></p></div> <div class="weui-cell__hd"><input type="checkbox" class="weui-check" name="checkbox1" id="s'+i+'"  onclick="check(' + cbid + ',\'' + cbname + '\',' + cbprice + ')"><i class="weui-icon-checked"></i></div></label></div></div>');

                             
                         }
                     }
                 },
                 error: function () {
                     alert("异常！");
                 }
             });
         });
         function check(cbid, name, price) {
            
             var height = $(window).height();
             var cc = $("#determine").height();
             $(".am-share-sns").css("height", height - cc);
             var datetime = $("#seldate_dummy").val();//获取选择预定的时间
             $.ajax({
                 type: "post",
                 url: "../MenuReserveHandler.ashx",
                 dataType: "json",
                 async: false,
                 data: { sdmc: name, funcName: 'getTimeState' },
                 success: function (data) {
                     for (var i = 0; i < data.length; i++) {
                         var sdmc = data[i].sdmc;
                         var kssj = data[i].kssj;
                         if (datetime == "")//如果时间为空则弹框提醒
                         {
                             $(".weui-dialog__bd").html("请选择用餐时间");
                             $("#dialog").css("display", "block");
                             $('[name=' + cbid + '] input[type="checkbox"]').prop('checked', false);
                         } else {
                             var d = new Date();

                             var a = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + (d.getMinutes() + reservationtime) + ":" + d.getSeconds();

                             var b = datetime + " " + kssj;
                             if (new Date(a) > new Date(b)) {
                                 $(".weui-dialog__bd").html("已不能订购今天的" + sdmc);
                                 $("#dialog").css("display", "block");
                                 $('[name=' + cbid + '] input[type="checkbox"]').prop('checked', false);
                             }
                             else {
                                 if ($('[name=' + cbid + '] input[type="checkbox"]').prop("checked")) {
                                     $("[name='count']").text(function (n, c) { return Number(c) + 1 });
                                     $("[name='sum']").text(function (n, c) { return Number(c) + Number(price) });
                                     var myar = new Array();
                                     $($("[name='" + datetime + "']")).each(function () {
                                         myar.push($(this).text());
                                     });
                                     // 包含该日期
                                     if (myar.indexOf(datetime) != -1) {
                                         debugger
                                         var myarr = new Array();
                                         $($("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='ww']")).each(function () {
                                             myarr.push($(this).text());
                                         });
                                         $("[name='" + datetime + "']").parents(".all").find(".top").after('<div class="bottom clearfloat" data-id="' + cbid + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="myCount" style="width:4rem;" >1</li></ul></div>');
                                        
                                     }
                                     else {   //不包含该日期则加入日期  
                                        $(".sdetail").prepend(' <div class="all"><div class="top clearfloat" name="top"><div class="you clearfloat fl"><span class="datetime" name="' + datetime + '">' + datetime + '</span></div></div></div>');
                                        $("[name='" + datetime + "']").parents(".all").find(".top").after('<div class="bottom clearfloat" data-id="' + cbid + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="myCount" style="width:4rem;">1</li></ul></div>');
                                     }
                                 }
                                 else {
                                     $("[name='count']").text(function (n, c) { return Number(c) - 1 });
                                     $("[name='sum']").text(function (n, c) { return Number(c) - Number(price) });
                                     var bb = $("[name='" + datetime + "']").parents(".all").find("[name='" + name + "']").parents(".all").find(".bottom").length;
                                     if (bb == 1) {
                                         $("[name='" + datetime + "']").parents(".all").remove();
                                     }else{
                                     $("[name='" + datetime + "']").parents(".top").siblings(".bottom").find("[name='" + name + "']").parents(".bottom").remove();
                                     }
                                     }
                             }
                         }
                     }
                 },
                 error: function () {
                     alert("异常！");
                 }
             });
         };
         var returntime = "";
         var reservationtime = "";
         var openid = "";
         var deductions = "";
         $(function () {
           
             function getUrlParam(openid) {
                 var reg = new RegExp("(^|&)" + openid + "=([^&]*)(&|$)");
                 var r = window.location.search.substr(1).match(reg);
                 if (r != null) return unescape(r[2]); return null;
             }
             openid = getUrlParam('openid');
             $("#OrderList").attr('href', "OrderList.aspx?openid=" + openid+"&type=list1");
             $.ajax({
                 type: "post",
                 url: "../MenuReserveHandler.ashx",
                 dataType: "json",
                 async: false,
                 data: { funcName: 'getall' },
                 success: function (data) {
                     for (var i = 0; i < data.length; i++) {
                       var  reservationdays = data[i].reservationdays;
                         reservationtime = data[i].reservationtime;
                         returntime = data[i].returntime;
                         deductions = data[i].deductions;
                         $.ajax({
                             type: "post",
                             url: "../MenuReserveHandler.ashx",
                             dataType: "json",
                             async: false,
                             data: { funcName: 'getdatatime', reservationdays: reservationdays },
                             success: function (data) {
                                 for (var i = 0; i < data.length; i++) {

                                     $("#seldate").append("<li>" + data[i] + "</li>");
                                 }

                             },
                             error: function () {
                                 alert("异常！");
                             }
                         });
                     }
                 },
                 error: function () {
                     alert("异常！");  
                 }
             });
             $("#seldate").change(function () {
                 $('input[type="checkbox"]').prop('checked', false);
                 var ww = $("#seldate_dummy").val();


                 var myar = new Array();
                 $($(".datetime")).each(function () {
                     myar.push($(this).text());
                 });
                 if (myar.indexOf(ww) != -1) {
                     $("[name='" + ww + "']").parents(".all").find("[name='ww']").each(function () {
                         var cbid = $(this).parents(".bottom").attr("data-id");
                         $('[name=' + cbid + '] input[type="checkbox"]').prop('checked', true);
                     });
                 }
                 $.ajax({
                     type: "post",
                     url: "../MenuReserveHandler.ashx",
                     dataType: "json",
                     async: false,
                     data: { funcName: 'Notorder' },
                     success: function (data) {

                         var time = {};
                         var tt = new Array();
                         for (var i = 0; i < data.length; i++) {

                             var remark = data[i].remark;
                             var str = data[i].notorderDate;
                             var tmp = /\d+(?=\+)/.exec(str);
                             var d = new Date(+tmp);
                             var notorderDate = "";
                                 //发布是取消注释
                            notorderDate = d.getFullYear() + '/' + (+d.getMonth() + 1) + '/' + d.getDate();
                             //if (d.getMonth() + 1 < 10 && d.getDate() >= 10) {
                             //    notorderDate = d.getFullYear() + '-0' + (+d.getMonth() + 1) + '-' + d.getDate();
                             //}
                             //else if (d.getDate() < 10 && d.getMonth() + 1 >= 10) {
                             //    notorderDate = d.getFullYear() + '-' + (+d.getMonth() + 1) + '-0' + d.getDate();
                             //}
                             //else if (d.getMonth() + 1 < 10 && d.getDate() < 10) {
                             //    notorderDate = d.getFullYear() + '-0' + (+d.getMonth() + 1) + '-0' + d.getDate();
                             //}
                             //else if (d.getMonth() + 1 >= 10 && d.getDate() >= 10) {
                             //    notorderDate = d.getFullYear() + '-' + (+d.getMonth() + 1) + '-' + d.getDate();
                             //}
                            
                             if (notorderDate == ww) {
                                 $(".weui-dialog__bd").html("" + ww + "不能订餐</br>" + remark + "");
                                 $("#dialog").css("display", "block");
                                 $("#seldate_dummy").val("");
                             }
                         }
                     },
                     error: function () {
                         alert("异常！");
                     }
                 });

             });
             $("#seldate").mobiscroll().treelist({
                 theme: "android-ics light",
                 lang: "zh",
                 cancelText: null,
                 headerText: "选择日期",
                 formatResult: function (array) { return $('#seldate>li').eq(array[0]).text(); }
             });
         })
    </script>
</head>
    <!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman" >

            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
    <!--header star-->
    	<%--<header class="mui-bar mui-bar-nav report-header box-s" id="header">
			<a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui fl"></i></a>
			<p>订餐系统</p>
            
	    </header>--%>
   <%-- <header class="mui-bar mui-bar-nav" id="header" style="position:fixed">
        <a class="btn" href="javascript:history.go(-1)">
            <i class="iconfont icon-fanhui"></i>
        </a>
        <div class="top-sch-box flex-col">
            <div class="centerflex">
                <i class="fdj iconfont icon-sousuo"></i>
                <input type="text"  id="MenuName" value="" class="sch-txt" placeholder="输入您要搜索的菜品" />
            </div>
        </div>
        <a class="btn" href="#">
            <i class="iconfont icon-gouwuche"></i>
            <span>2</span>
        </a>
    </header>--%>
    <!--header end-->

    <div class="warp clearfloat">
        <div class="lists clearfloat">
   <div style="width:100%; position:fixed; z-index:10" id="tops">
           <div class="time clearfloat">
               <%-- <span style="display:none" id="openid"></span>--%>
                <ul>
                   <li style="width: 5%;"><a href="javascript:history.go(-1)"><i class="iconfont icon-fanhui fl"></i></a></li> 
                    <li style="width: 30%;">选择日期</li>
                    <li style="width: 65% ;text-align:left;">
                        <ul id="seldate" style="text-align:center">
                            
                            </ul>
                   
                    </li>
                </ul>
            </div>
               
            <div class="order-top clearfloat" style="height:0.3rem">
              <%--  <ul>
                    <li class="clearfloat"><a href="#">时间段</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('breakfast')" id="breakfast"><a href="#">早餐</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('lunch')" id="lunch"><a href="#">中餐</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('dinner')" id="dinner"><a href="#">晚餐</a></li>
                    <li class="clearfloat" onclick="SelectTimeState('midnightSnack')" id="midnightSnack"><a href="#">夜宵</a></li>
                </ul>--%>
           </div>
            </div>
            <div id="content" style="clear:both;padding-top:1.5rem;"></div>
        
         <%--  <div class="bottom clearfloat" style="margin:0;border:5px;border-color:black">
                  <div class="weui-cells weui-cells_checkbox" style="margin:0;border:5px;border-color:black">
                   <label class="weui-cell weui-check__label"  style="padding-bottom:0.4rem;padding-top:0.4rem">
                             <div class="weui-cell__bd">
            <p class="tit" style="font-size:20px;">早餐 <span class="jifen fl over" style="float:none;font-size:20px;">￥10</span></p>
        </div>
                <div >
                    <input type="checkbox" class="weui-check" name="checkbox1" >
                    <i class="weui-icon-checked"></i>
              
                </div>
         
            </label>
         
                      </div>
         </div>
            <div class="bottom clearfloat" style="margin:0;border-bottom:5px;border-color:black;">
                  <div class="weui-cells weui-cells_checkbox" style="margin:0;border-bottom:5px;border-color:black">
                   <label class="weui-cell weui-check__label"  style="padding-bottom:0.4rem;padding-top:0.4rem;border-bottom:5px;border-color:black">
                             <div class="weui-cell__bd">
            <p class="tit" style="font-size:20px;">早餐 <span class="jifen fl over" style="float:none;font-size:20px;">￥10</span></p>
        </div>
                <div >
                    <input type="checkbox" class="weui-check" name="checkbox1" >
                    <i class="weui-icon-checked"></i>
              
                </div>
         
            </label>
         
                      </div>
         </div>--%>
        <!--footerone star-->
        <div class="settlement clearfloat">
            <div class="zuo clearfloat fl box-s">
                共<span name="count">0</span>件  总金额：￥<span name="sum">0</span>
            </div>
            <a href="#" onclick="toshare()" class="fl db">提交订单
            </a>
        </div>
        <!--footerone end-->

        <!--这里是弹出购物车内容-->
        <div class="am-share">
            <div class="am-share-footer">
                <button class="share_btn">
                    <img src="../images/chahao.png" /></button>
            </div>
            <div class="am-share-sns box-s">
                <div class="sdetail clearfloat">
              <%--  <div class="all"><div class="top clearfloat" name="top"><div class="you clearfloat fl"><span class="datetime" name="' + datetime + '">' + datetime + '</span></div></div></div>
                   <div class="bottom clearfloat" data-id="' + cbid + '"><p name="' + name + '" class="fl"><span  name="ww"  style="color:black">' + name + '</span><span name="myPrice">' + price + '</span></p><div class="you clearfloat fr"><ul><li name="jianBtn" onclick="jianBtn(\'' + name + '\',' + price + ',\'' + datetime + '\')"><img src="../images/jian.jpg" /></li><li name="myCount" >1</li><li name="jiaBtn" onclick="jiaBtn(\'' + name + '\',' + price + ',\'' + datetime + '\')"><img src="../images/jia.jpg" /></li></ul></div>
                   --%> <%--  <div class="all">
                    <div class="top clearfloat">
                        <div class="you clearfloat fl">
                              <span>日期 4月13号</span>
                           
                          
                        </div>
                    </div>
                    <div class="bottomall">
                        <p class="tit">午餐预定</p>
                         	<div class="bottom clearfloat">
                                
		     		<p class="fl">菜单1 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">1</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                   <div class="bottom clearfloat">
		     		<p class="fl">菜单2 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">2</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                        </div>
                      <div class="bottomall">
                        <p class="tit">午餐预定</p>
                         	<div class="bottom clearfloat">
                                
		     		<p class="fl">菜单1 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">1</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                   <div class="bottom clearfloat">
		     		<p class="fl">菜单2 <span name="myPrice">10</span></p>
		     		<div class="you clearfloat fr">
		     			<ul>
		     				<li name="jianBtn"><img src="../images/jian.jpg"/></li>
		     				<li name="myCount">2</li>
		     				<li name="jiaBtn"><img src="../images/jia.jpg"/></li>
		     			</ul>
		     		</div>
		     	</div>
                          </div>
                        </div>--%>
                    <div class="confirm clearfloat">
                        <div class="gmshu clearfloat box-s fl">
                            <p class="fr">共<span name="count">0</span>件商品   合计￥<samp name="sum" id="sum">0</samp></p>
                        </div>
                    </div>
                </div>
            </div>
            <a href="#" onclick="submit()" class="shop-btn db" id="determine">确定</a>
        </div>
   <div style="display: none;"   id="dialog">
    <div class="weui-mask"></div>
    <div class="weui-dialog">
        <div class="weui-dialog__hd"><strong class="weui-dialog__title">提示</strong></div>
        <div class="weui-dialog__bd"></div>
        <div class="weui-dialog__ft">
            <a  href="javascript:$('#dialog').hide();" class="weui-dialog__btn weui-dialog__btn_primary" id="que">确定</a>
        </div>
    </div>
</div>
       <div id="toast" style="display: none;">
    <div class="weui-mask_transparent"></div>
    <div class="weui-toast">
        <i class="weui-icon-success-no-circle weui-icon_toast"></i>
        <p class="weui-toast__content">订餐成功！</p>
    </div>
</div>
        <!--footer star-->
        <footer class="page-footer fixed-footer" id="footer">
            <ul>
               <%-- <li>
                    <a href="index.html">
                        <i class="iconfont icon-shouye" style=""></i>
                        <p>首页</p>
                    </a>
                </li>--%>
                <li class="active" >
                    <a href="#">
                        <i class="iconfont icon-icon04"></i>
                        <p>在线订餐</p>
                    </a>
                </li>
                <li class="right">
                    <%--openid=<%=openid%>"--%>
                    <a href="#" id="OrderList">
                        <i class="iconfont icon-gouwuche"></i>
                        <p>我的订餐</p>
                    </a>
                </li>
               <%-- <li>
                    <a href="login.html">
                        <i class="iconfont icon-yonghuming"></i>
                        <p>个人中心</p>
                    </a>
                </li>--%>
            </ul>
        </footer>
        <!--footer end-->
</body>
    <script src="../Script/mui.min.js"></script>
<script src="../Script/others.js"></script>
<script type="text/javascript" src="../Script/hmt.js"></script>
<script src="../Script/slick/slick.js" type="text/javascript"></script>
<script src="../Script/shopcar.js"></script>
<!--插件-->
<link rel="stylesheet" href="../css/swiper.min.css">
<script src="../Script/swiper.jquery.min.js"></script>
</html>

